//
// Created by admin on 2022/10/8.
//

#import "CYBaseKitHelper.h"

NSString *const kQMUIResourcesBundleName = @"Images";

@implementation CYBaseKitHelper

@end


@implementation CYBaseKitHelper(Bundle)
+ (UIImage *)cy_module_imageWithName:(NSString *)name {
    static NSBundle *resourceBundle = nil;
    if (!resourceBundle) {
        NSBundle *mainBundle = [NSBundle bundleForClass:self];
        NSString *resourcePath = [mainBundle pathForResource:kQMUIResourcesBundleName ofType:@"bundle"];
        resourceBundle = [NSBundle bundleWithPath:resourcePath] ?: mainBundle;
    }
    UIImage *image = [UIImage imageNamed:name inBundle:resourceBundle compatibleWithTraitCollection:nil];
    return image;
}

@end